<?php
/*
 * Author :pandiam
 */
require_once ('include/css_head.php');
require_once ('include/functions.php');
require_once ('include/header.php');
require_once ('include/functions.php');
?>
    <div>
        <div id="msg-box">
        <?php
        if (isset($_SESSION['uid']) && (($_SESSION['uid']) != -1))
        {
            echo "\n        </div>";
            UI_registerError('msg_info', "You are already logged-in, <a href=\"logout.php\">logout</a> first.");
            header("location: index.php");
            exit(0);
        }
        else
        {
?>
        <fieldset id="fieldsetLogIn">
			<legend style="margin-left:10px"> <font size="4"> Log in </font> </legend>

			<form action="loginDo.php" method="post">

				<p style="margin-top:10px; margin-left:20px;"  align="left">Username:</p>
				<input style="height:20px" type="text" name="username" maxlength="30" size="30" required /><br/>

				<p style="margin-top:10px; margin-left:20px;" align="left">Password:</p>
				<input style="height:20px" type="password" name="password" maxlength="30" size="30" required /><br/>

				<br/><input class="button" type="submit" value="Login"/>
			</form>
            <p style="margin-top: 20px">
			    <a href="retrieveInfo.php">Forgot your id or password?</a><br />
                <span>or</span><br />
    			<a href="register.php" style="text-align:center" >You don't have an account?</a>
            </p>

        </fieldset>

<?php
        }
echo "\n    </div>";
echo "\n</div>";

require_once ('include/footer.php');
?>